//配置数据库连接
const { Sequelize } = require('sequelize')
const sequelize = new Sequelize('smart_traffic', 'root', 'lyc147369', {
  host: 'localhost',
  dialect: 'mysql',
})

async function test() {
  try {
    await sequelize.authenticate()
    console.log('连接成功')
  } catch (error) {
    console.error('连接失败:', error)
  }
}
test()

module.exports = sequelize
